#include<bits/stdc++.h>
using namespace std;
int main()
{
    int n;
    cin>>n;
    int ret;
    while(n)
    {
        ret=n%10;
        cout<<ret;
        n=n/10;
    }
    return 0;
}
